package bairui.international.controller.branch.branch;

import com.sh_lianjing.spring.web.controller.enhance.module.*;
import com.sh_lianjing.spring.web.controller.enhance.module.body.*;
import com.sh_lianjing.spring.web.controller.enhance.output.bean.*;
import bairui.international.controller.branch.branch.C_BranchCompany_Delete_Delete;
import bairui.international.controller.branch.branch.C_BranchCompany_Publish_Submit;
import bairui.international.controller.branch.branch.C_BranchCompany_Up_Submit;
import bairui.international.controller.branch.branch.C_BranchCompany_Down_Submit;

/**
 *
 * Module_Info
 *
 */
class Module_Info{

	
	/**
	 * 信息模块
	 */
	public Module module(
		Module_Info_OutputModel bean, 
		C_BranchCompany_Delete_Delete.Delete.Operate c_BranchCompany_Delete_Delete_Delete_Operate
	,	C_BranchCompany_Publish_Submit.Submit.Operate c_BranchCompany_Publish_Submit_Submit_Operate
	,	C_BranchCompany_Up_Submit.Submit.Operate c_BranchCompany_Up_Submit_Submit_Operate
	,	C_BranchCompany_Down_Submit.Submit.Operate c_BranchCompany_Down_Submit_Submit_Operate
	){
		return
			new Module(
					new ModuleHead("信息")
						.addOperate(
							c_BranchCompany_Delete_Delete_Delete_Operate
								.defaultComment("删除")
						)
						.addOperate(
							c_BranchCompany_Publish_Submit_Submit_Operate
								.defaultComment("发布")
						)
						.addOperate(
							c_BranchCompany_Up_Submit_Submit_Operate
								.defaultComment("上架")
						)
						.addOperate(
							c_BranchCompany_Down_Submit_Submit_Operate
								.defaultComment("下架")
						)
					, 
					new InfoModuleBody(
								bean
							,
							new OutputBeanGroup(
									OutputWay.Vertical, 
									OutputData.info()
								)
						)
				);
	}
	
	/**
	 * 输出信息
	 */
	private static class OutputData {
	
		private static final OutputBean[] info() {
			OutputData outputData = new OutputData();
			return new OutputBean[]{
						outputData.getNumber(),
						outputData.getName(),
						outputData.getPhone(),
						outputData.getState(),
						outputData.getComment(),
				};
		}
	
		OutputBean getNumber(){
			return new OutputBean("number", "代码", true, DataDisplay.Show, DataType.String, new OutputType[]{OutputType.Ajax, OutputType.Excel, }, "yy/MM/dd HH:mm:ss");
		}
		OutputBean getName(){
			return new OutputBean("name", "名称", true, DataDisplay.Show, DataType.String, new OutputType[]{OutputType.Ajax, OutputType.Excel, }, "yy/MM/dd HH:mm:ss");
		}
		OutputBean getPhone(){
			return new OutputBean("phone", "电话", true, DataDisplay.Show, DataType.String, new OutputType[]{OutputType.Ajax, OutputType.Excel, }, "yy/MM/dd HH:mm:ss");
		}
		OutputBean getState(){
			return new OutputBean("state", "状态", true, DataDisplay.Show, DataType.Enum, new OutputType[]{OutputType.Ajax, OutputType.Excel, }, "yy/MM/dd HH:mm:ss");
		}
		OutputBean getComment(){
			return new OutputBean("comment", "备注", true, DataDisplay.Show, DataType.String, new OutputType[]{OutputType.Ajax, OutputType.Excel, }, "yy/MM/dd HH:mm:ss");
		}
	}
	
	
	
	
	/**
	 * 输出模型
	 */
	

}
